<template>
	<!-- 我的-入驻服务 -->
	<view class="ResidencyServices">
		<view class="title">
			入驻服务
		</view>
		<view class="main">
			<view class="main-item" @click="JumpRiderServices">
				<!-- <image src="../../image/my/rider.png" mode=""></image> -->
				<img src="../../static/my/rider.png" alt="">
				<view class="">
					骑手入驻
				</view>
			</view>
			<view class="main-item" @click="JumpMerchantSettlement">
				<!-- <image src="../../image/my/business.png" mode=""></image> -->
				<img src="../../static/my/business.png" alt="">
				<view class="">
					商家入驻
				</view>
			</view>
			<view class="main-item" @click="JumpMerchantVerification" v-if="verifier_id != ''">
				<!-- <image src="../../image/my/businesssao.png" mode=""></image> -->
				<img src="../../static/my/businesssao.png" alt="">
				<view class="">
					自提核销
				</view>
			</view>
			<view class="main-item" @click.native="JumpRider" v-if="is_deliveryman == 1">
				<!-- <image src="../../image/my/businesssao.png" mode=""></image> -->
				<img src="../../static/my/Expressdeliverytruck.png" alt="">
				<view class="">
					前往骑手端
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const $api = require('@/utils/request.js').API
	export default {
		props: ['is_deliveryman'],
		data(){
			return {
				verifier_id: ''
			}
		},
		created(){
			this.verifierOrNot()
		},
		methods: {
			verifierOrNot(){
				$api.postVerifierOrNot({}).then(res => {
					this.verifier_id = res.data.data
				})
			},
			// 跳转骑手入驻
			JumpRiderServices(){
				uni.navigateTo({
					url:'../../pages/my/ResidencyServices/RiderServices?is_deliveryman=' + this.is_deliveryman
				})
			},
			// 跳转商户入驻
			JumpMerchantSettlement(){
				uni.navigateTo({
					url:'../../pages/my/ResidencyServices/MerchantSettlement'
				})
			},
			// 跳转自提核销
			JumpMerchantVerification(){
				uni.navigateTo({
					url:'../../pages/my/ResidencyServices/MerchantVerification'
				})
			},
			// 跳转骑手端
			JumpRider(){
				uni.redirectTo({
					// url:'../../pages_rider/index/index'
					url:'../../pages_rider/footer/footerView'
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.ResidencyServices {
		background: white;
		border-radius: 14rpx;
		.title {
			font-size: 30rpx;
			padding-top: 20rpx;
			font-weight: 400;
			padding-left: 21rpx;
		}
		.main {
			display: flex;
			justify-content: space-around;
			// width: 350rpx;
			// width: 530rpx;
			min-width: 530rpx;
			padding-bottom: 20rpx;
			.main-item {
				font-size: 24rpx;
				text-align: center;
				margin-top: 25rpx;
				// padding-left: ;
				image {
					width: 52rpx;
					height: 42rpx;
				}
				img {
					width: 52rpx;
					height: 42rpx;
				}
			}
			
		}
	}
</style>